/*
 * Text.cpp
 *
 *  Created on: 2012/07/12
 *      Author: weihe
 */

#include "Text.h"

namespace object {

Text::~Text() {
}

void Text::draw() {
	int posY = y;
	glRasterPos2f(x, posY);
	const char *s = txt.c_str();
	while (*s) {
		if (*s == '\n') {
			posY += 4;
			glRasterPos2f(x, posY);
		}
		glutBitmapCharacter(font, *s++);
	}
}

} /* namespace object */
